package com.shop.domain.system;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.*;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;

/**
 * <p>SystemConfig 实体类</p>
 * <p>Table: t_system_config - 配置表</p>
 * @author generator
 * @date 2021-02-28 11:32:59
 */
@ApiModel("SystemConfig 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_system_config")
@SQLDelete(sql = "update t_system_config set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class SystemConfig extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 字段名称
	 */
    @ApiModelProperty("字段名称")
	@Column(name = "menu_name")
    private String menuName;

    /**
	 * 类型(文本框,单选按钮...)
	 */
    @ApiModelProperty("类型(文本框,单选按钮...)")
	@Column(name = "type")
    private String type;

    /**
	 * 表单类型
	 */
    @ApiModelProperty("表单类型")
	@Column(name = "input_type")
    private String inputType;

    /**
	 * 配置分类id
	 */
    @ApiModelProperty("配置分类id")
	@Column(name = "config_tab_id")
    private Long configTabId;

    /**
	 * 规则 单选框和多选框
	 */
    @ApiModelProperty("规则 单选框和多选框")
	@Column(name = "parameter")
    private String parameter;

    /**
	 * 上传文件格式1单图2多图3文件
	 */
    @ApiModelProperty("上传文件格式1单图2多图3文件")
	@Column(name = "upload_type")
    private Integer uploadType;

    /**
	 * 规则
	 */
    @ApiModelProperty("规则")
	@Column(name = "required")
    private String required;

    /**
	 * 多行文本框的宽度
	 */
    @ApiModelProperty("多行文本框的宽度")
	@Column(name = "width")
    private Integer width;

    /**
	 * 多行文框的高度
	 */
    @ApiModelProperty("多行文框的高度")
	@Column(name = "high")
    private Integer high;

    /**
	 * 默认值
	 */
    @ApiModelProperty("默认值")
	@Column(name = "value")
    private String value;

    /**
	 * 配置名称
	 */
    @ApiModelProperty("配置名称")
	@Column(name = "info")
    private String info;

    /**
	 * 配置简介
	 */
    @ApiModelProperty("配置简介")
	@Column(name = "desc")
    private String desc;

    /**
	 * 排序
	 */
    @ApiModelProperty("排序")
	@Column(name = "sort")
    private Integer sort;

    /**
	 * 是否隐藏
	 */
    @ApiModelProperty("是否隐藏")
	@Column(name = "status")
    private Integer status;

    /**
	 * 创建时间
	 */
    @ApiModelProperty("创建时间")
	@Column(name = "create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
	 * 修改时间
	 */
    @ApiModelProperty("修改时间")
	@Column(name = "update_time")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
	 * 是否删除
	 */
    @ApiModelProperty("是否删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}